package com.wxh.dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import com.wxh.entity.Student;

/**
 * @ClassName: StudentDao
 * @Description: 学生数据访问接口
 * @Author wxh
 * @Date: 2019/12/6 11:28
 * @Version V1.0.0
 * @Since 1.8
 */
@Mapper
public interface StudentDao {

    /**
     * 新增学生信息
     * @param student 学生对象
     * @return Integer 行数
     */
    @Insert("INSERT INTO student(student_id,student_name) VALUES(#{studentId},#{studentName})")
    Integer insertStudent(Student student);

    /**
     * 查询学生信息
     * @param student 学生对象
     * @return Student 学生对象
     */
    @Select("SELECT * FROM student WHERE student_id = #{studentId}")
    Student queryStudentByStudentId(Student student);
}
